'use strict';

module.exports = (app) => {
    const {DataTypes} = app.Sequelize;
    const Photo = app.model.define('photo', {
        id: { 
            type: DataTypes.UUID,
            defaultValue: app.Sequelize.UUIDV4, 
            primaryKey: true,
            notNull: true,
            comment: 'ID'
        },
        photoTitle:{type: DataTypes.STRING(100),comment: '图片的标题'},
        photoDeatil:{type: DataTypes.STRING(500),comment: '图片的url'},
    },
  );
  Photo.sync()
  return Photo;
};